<?php
class loginTop extends CWidget{
	public function run(){
		$model = new loginForm();
		if(Yii::app()->request->isPostRequest){
			if(!empty($_POST['loginForm'])){
				$model->setAttributes(@$_POST['loginForm'],false);
			}
			if($model->validate()){
				$model->login();
			}
		}
		$this->render("login_top",array(
			'model_login' => $model
		));
	}
}
?>